Skip to content

Conversation

nickcoai
Copy link
Contributor

Motivation and Context

Currently the SDK defaults imply certain properties for httpx clients, two notable ones are redirect policies as well as proxies. To support various security configurations instead make the client wholly injectable. This avoids clients needing to fork the entire transport method.

How Has This Been Tested?

Tested locally with a fake client.

Breaking Changes

None.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

N/A

@ihrpr ihrpr modified the milestones: r-05-25, HPR May 19, 2025
# Conflicts:
#	src/mcp/client/sse.py
#	src/mcp/client/streamable_http.py
Copy link
Contributor

@ihrpr ihrpr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! Would be great to add instruction to README as well

@ihrpr ihrpr merged commit 10cf0f7 into modelcontextprotocol:main May 23, 2025
10 checks passed
@Kludex
Copy link
Member

Kludex commented Jun 2, 2025

It would have been better to pass the client itself...

@rumperto
Copy link

rumperto commented Jun 3, 2025

It would have been better to pass the client itself...

Agree with this

@rumperto
Copy link

rumperto commented Jun 3, 2025

A new unit test would have been nice too.

@Kludex
Copy link
Member

Kludex commented Jun 11, 2025

And now I notice that the timeout parameter is not even included in the call to the callback... 😞

@ihrpr
Copy link
Contributor

ihrpr commented Jun 11, 2025

And now I notice that the timeout parameter is not even included in the call to the callback... 😞

it's not in sse, but in general is there, am I missing something?

@Kludex
Copy link
Member

Kludex commented Jun 11, 2025

And now I notice that the timeout parameter is not even included in the call to the callback... 😞

it's not in sse, but in general is there, am I missing something?

Ah, I missed that, sorry.

That said, on the sse, we use the client, so you can actually pass the timeout to the client before using the aconnect_sse. Can't we?

@ihrpr
Copy link
Contributor

ihrpr commented Jun 11, 2025

And now I notice that the timeout parameter is not even included in the call to the callback... 😞

it's not in sse, but in general is there, am I missing something?

Ah, I missed that, sorry.

That said, on the sse, we use the client, so you can actually pass the timeout to the client before using the aconnect_sse. Can't we?

yes, we should, I can just add this as there were a couple of PRs and issues about it

saqadri pushed a commit to saqadri/stdio-fixes that referenced this pull request Aug 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants